import { getQuickInsertMockCodeFilePath, readFileContent } from '@main/util/CommUtil'
import { app, ipcMain } from 'electron'

export function setupQuickInsertMockCodeHander() {
  ipcMain.handle('getQuickInsertMockCode', async (_, fileName: string) => {
    const filePath = getQuickInsertMockCodeFilePath(fileName)
    const content = readFileContent(filePath)
    console.log('getQuickInsertMockCode', filePath, content)
    return content
  })
}
